import tkinter as tk
from tkinter import *
from conf.WindowSettings import *
from func.TextEditCore import TextEditCore
from func.ConsoleUtil import console, ELogColorType
from LayoutSideBar import *
# main
root = tk.Tk()

# 分辨率，标题，不可伸缩
root.geometry(f"{window_width}x{window_height}+{window_pos_x}+{window_pos_y}")
root.title(window_title)
root.resizable(width=False, height=False)

# 创建左侧小窗口
left_window = tk.Frame(root, width=width_l, height=height_l, bg="#EDE0C9")
left_window.place(x=x_l, y=y_l)

# 创建右侧大窗口
right_window = tk.Frame(root, width=width_r, height=height_r, bg="#EEE4DA")
right_window.place(x=x_r, y=y_r)

console.log("appliction launched!", ELogColorType.Yellow)
# 初始化侧边栏
LayoutSideBar(left_window)
# 初始化文本编辑器
text_edit = TextEditCore(root, right_window)
text_edit.show()

root.mainloop()
console.log("application quit!", ELogColorType.Yellow)